apiVersion: ceph.rook.io/v1
kind: CephCluster
metadata:
  name: rook-ceph
  namespace: rook-ceph
spec:
  cephVersion:
    image: {{registry_prefix}}:{{registry_port}}/{{ ceph_ceph_image }}:{{ ceph_ceph_version }}
    allowUnsupported: false
  dataDirHostPath: /var/lib/rook
  skipUpgradeChecks: false
  mon:
    count: {{ groups['kube-node'] | length }}
    allowMultiplePerNode: false
  mgr:
    modules:
  dashboard:
    enabled: true
    ssl: false
  monitoring:
    enabled: false
    rulesNamespace: rook-ceph
  network:
    hostNetwork: false
  rbdMirroring:
    workers: 0
  annotations:
  resources:
  removeOSDsIfOutAndSafeToRemove: false
  storage:
    useAllNodes: false
    useAllDevices: false
    topologyAware: true
    deviceFilter:
    location:
    config:
    nodes:
{% for h in groups['kube-node'] %}
    - name: "{{hostvars[h]['inventory_hostname']}}"
{% if device_type == 'device' %}
      devices:
{% for device in rook_path.split(',') %}
      - name: "{{ device }}"
{% endfor %}
{% endif %}
{% if device_type == 'path' %}
      directories:
      - path: "{{ rook_path }}"
{% endif %}
{% endfor %}
  disruptionManagement:
    managePodBudgets: false
    osdMaintenanceTimeout: 30
    manageMachineDisruptionBudgets: false
    machineDisruptionBudgetNamespace: openshift-machine-api
